
<div id="maincolumn">
	<h2 class="main list" id="main-title">Product & Category Management</h2>   
    <div id="contentcolumn">
     
    	<fieldset id="blocks">
        <!-- Tabs -->
        <div id="Tab" class="mainTabs">
            <ul class="tab-menu">
                <li id="active" <?php //$visit_customer?>><a><span>Product Listing</span></a></li>
                <li id="category_tab" <?php // $visit_switch?>><a><span>Category Information</span></a></li>
                <li id="gallery_tab" <?php // $visit_odf?>><a><span>Gallery Management</span></a></li>
                <li id="account_tab" <?php // $visit_poll?>><a><span>Account</span></a></li>
            </ul>
            <div class="clear"></div>
        </div>        
        <div id="TabContent">
            <div class="tabcontent"><!-- Active -->            	
                <div id="contentcolumn">
                    <div id="activeList"></div>
                </div>
            </div>
            <div class="tabcontent"><!-- Deactive -->
                <div id="contentcolumn">
                	<div id="category_info"></div> 
                </div>
            </div> 
            <div class="tabcontent"><!-- Deactive -->
                <div id="contentcolumn">
                	<div id="gallery_info"></div> 
                </div>
            </div>
            <div class="tabcontent"><!-- testing -->
                <div id="contentcolumn">
                	<div id="account_info"></div> 
                </div>
            </div>              
        </div>
    	</fieldset>
        
    </div>   

</div> <!-- /maincolumn -->
<style>
#row:hover{
	background:#eeeeee !important;
}
</style>
<script type="text/javascript">
	/** 
	 * Tabs init
	 *
	 */
	new TabSwapper({tabsContainer: 'Tab', sectionsContainer: 'TabContent', selectedClass: 'selected', deselectedClass: '', tabs: 'li', clickers: 'li a', sections: 'div.tabcontent', cookieName: 'tabManagement' });
	
	// customer listing
	$('active').addEvent('click', function()
	{
		if ( ! this.retrieve('loaded'))
		{ 
			ION.updateElement({
				'url': 'pr_tab_management_cl/get_list_pagination/',
				'element': 'activeList'
			});			
			
			ION.initToolbox('pr_product_toolbox_tab');
		}
	});
	
	/**
	 * Get Tab
	 *
	 */
	 // testing list tab
	$('category_tab').addEvent('click', function()
	{
		if ( ! this.retrieve('loaded'))
		{ 
			ION.updateElement({
				'url': 'pr_category_cl/get_list_pagination/',
				'element': 'category_info'
			});
			/**
			 * Panel toolbox
			 *
			 */
			ION.initToolbox('pr_category_toolbox_tab');	
		}
	});

	/**
	 * Get Tab
	 *
	 */
	 	
	/// poll listing
	$('gallery_tab').addEvent('click', function()
	{
		if ( ! this.retrieve('loaded'))
		{ 
			ION.updateElement({
				'url': 'pr_gallery_cl/get_list_gallery/',
				'element': 'gallery_info'
			});	
			//ION.initToolbox('isp_ipinfo_locat_toolbox');
		}
	});
	

	/**
	 * Get Tab
	 *
	 */
	 // switch list tab
	$('account_tab').addEvent('click', function()
	{
		if ( ! this.retrieve('loaded'))
		{ 
			ION.updateElement({
				'url': 'pr_tab_account_cl/get_list_pagination',
				'element': 'account_info'
			});
			ION.initToolbox('pr_account_toolbox_tab');
			
		}
		
	});
	
	<?php
	if(!isset($_COOKIE['tabManagement'])){
	?>
	$('active').fireEvent('click');		
	<?php	
	}elseif($_COOKIE['tabManagement'] == 3){
	?>
	// testing
	$('account_tab').fireEvent('click');
	<?php	
	}elseif($_COOKIE['tabManagement'] == 2){
	?>
	$('gallery_tab').fireEvent('click');
	<?php
	}elseif($_COOKIE['tabManagement'] == 1){
	?>
	$('category_tab').fireEvent('click');
	<?php
	}elseif($_COOKIE['tabManagement'] == 0){
	?>
	$('active').fireEvent('click');
	<?php
	}
	?>
	
	//$('port_tab').fireEvent('click');
	
	/**
	 * Options Accordion
	 *
	 */
	ION.initAccordion('.toggler1', 'div.element1', false);
	
	/**
	 * Panel toolbox
	 *
	 */
	//ION.initToolbox('isp_ipinfo_customer_toolbox');	
	
	/**
	 * Jquery script for autocomplete combobox
	 *
	 */	
	
		
</script>